package com.fpd.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @program: hecheng
 * @description: 还款金额详情
 * @author: zhukunpeng
 * @create: 2019-11-27 15:58
 **/
@Data
public class MoneyBackRecordInfoAmountDetailVO {

    private BigDecimal leftTotalDebt;//应还欠款

    private BigDecimal totalBackAmount;//总还款金额

    private BigDecimal leftAmount;//剩余欠款

    private String contractNumber;//合同号
    private String custNo;//合同号
    private int alreadyPeriod;
    private String auditAmount;//待审核说明
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date visitTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date beginTimeCase;
    private int repaymentDays;
    private int agePart;
    private int custClassify;
    private int aging;
    
    public BigDecimal getLeftAmount() {
        if (leftTotalDebt != null){
            return leftTotalDebt.subtract(totalBackAmount);
        }else {
            return new BigDecimal(0);
        }

    }
}
